﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using kim.Common;
using System.Data;
namespace kim.Web
{
    public partial class news : kim.UI.BasePage
    {
        protected string StrPage;
        protected int pageSize, pageIndex;
        protected string ContentText, titleText, topText;
        protected void Page_Load(object sender, EventArgs e)
        {
           
            GetStrPage1();
        }
        private void GetStrPage1()
        {
            pageIndex = KIMRequest.GetInt("p", 1);
            string strUrl =string.Empty;
            string strWhere = "ClassID=" + typeid + "and ChannelID=" + fid + " and DesignerID=1";
            strUrl = "news.aspx?p=__id__&typeid=" + typeid + "&fid=" + fid ;
            pageSize = 10;
            kim.BLL.eg_news bll = new kim.BLL.eg_news();
            int count = SqlDbHelper.GetPageCurrent("eg_news", strWhere);
            using (DataSet dt = bll.GetNewsPager(pageIndex, pageSize, "", "Sort Desc", strWhere))
            {
                rptlist.DataSource = dt;
                rptlist.DataBind();
            }
            StrPage = kim.Common.Utils.OutPageList(pageSize, pageIndex, count, strUrl, 10);
        }

    }
}